<template>
<div>
    <detailProp v-if="adPlaceId&&adPlaceId!='null'"  :id="adPlaceId"  :type='1'/>
    <!-- 可兑换道具详情 -->
    <exchangeDetail v-if="propTemplateId&&propTemplateId!='null'" :propTemplateId="propTemplateId" :type='1'/>
</div>
</template>
<script>
import {reactive,toRefs, onMounted,getCurrentInstance } from 'vue'
import { useStore } from 'vuex'
import {useRoute} from 'vue-router'
import detailProp from '@/views/prop/components/detail.vue'
import exchangeDetail from '@/views/prop/components/exchangeDetail.vue'

export default {
    components:{
        detailProp,
        exchangeDetail
    },
    setup(){
        const store = useStore()
        const {proxy} = getCurrentInstance()
         const route = useRoute()
        const state = reactive({
            adPlaceId:'',
            details:'',
            propTemplateId:''
        })
        onMounted(()=>{
     
            state.adPlaceId =route.query.arPropId || null
            state.propTemplateId =route.query.propTemplateId|| null
                   console.log( state.adPlaceId, state.propTemplateId)
        })
        
        return {
            ...toRefs(state)
        }
    }
}
</script>

<style lang="scss" scoped>
</style>